package crew.blt.handsound.client.widgets;

import com.google.gwt.uibinder.client.UiConstructor;

import crew.blt.handsound.shared.domain.AuthType;
import crew.gwt.client.widgets.CrewListBox;

public class AuthTypeListBox extends CrewListBox 
{
	public @UiConstructor AuthTypeListBox() {
		for(AuthType auth : AuthType.values())
			addItemIfNotPresent(auth.name());
	}
	
	public AuthType getSelectedAppRole(){
		if(getSelectedIndex() == -1)
			return null;
		return AuthType.valueOf(getItemText(getSelectedIndex()));
	}
}

